package com.oig.sys.workflow.dao;

import com.oig.sys.workflow.entity.TbCronJob;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author wuxl
 */
public interface ITbCronJobDao extends JpaRepository<TbCronJob, Integer> {

	@Query("from TbCronJob j where j.id=:id")
	TbCronJob getCronJobById(@Param("id") Integer id);

	@Query("from TbCronJob j where j.status='04' and j.enable='1'")
	List<TbCronJob> findAllEnableJob();

}
